<?php
//include controller class
?>
<script language="javascript" type="text/javascript">
	
    function getValueSingle(kode, nama) {
        try {
            parent.parent._obj_fSendValue(kode, nama, 'id_sjkp', 'nama_sjkp');
        }
        catch(e) { alert(e.message); }
        parent.parent.focus();

<?php echo CloseGB(false); // close grebox   ?>
                 
    }
</script>

<div id="masthead">
    <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
        <tr>
            <td><h1>Data Jenis Kas Penjualan</h1></td>
            <td id="breadcrumb_right">&nbsp;</td>
        </tr>
    </table>
</div>

<div id="content">

    <div class="DivTable">
        <form name="fCari" id="fCari" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" >
            <table class="GridTableFilter">
                <tr>
                    <td>
                        <?php
                        echo $fp;
                        ?>
                    </td>
                </tr>
            </table>
        </form>

        <table class="GridTable">
            <tr class="GridHeader">
                <td>No.</td>
                <td>Jenis</td>
                <td>Sub Jenis</td>
            </tr>
            <?php
            if ($rows > 0) {
                $nomor = $offset;
                foreach ($data as $row) {
                    $nomor++;

                    $styleTR = "GridItem1";
                    ?>
                    <tr class="<?php echo $styleTR; ?>" >
                        <td onclick="getValueSingle('<?php echo $row->id_sjkp; ?>', '<?php echo $row->nama_sjkp; ?>')"><?php echo $nomor; ?></td>
                        <td onclick="getValueSingle('<?php echo $row->id_sjkp; ?>', '<?php echo $row->nama_sjkp; ?>')"><?php echo $row->nama_jkp; ?></td>
                        <td onclick="getValueSingle('<?php echo $row->id_sjkp; ?>', '<?php echo $row->nama_sjkp; ?>')"><?php echo $row->nama_sjkp; ?>
                            <input type="hidden" name="vNama" value="<?php echo str_replace("'", "\'", $row->nama_sjkp); ?>" /></td>
                    </tr>
                    <?php
                }
            } else {
                ?>
                <tr class="GridItem1">
                    <td colspan="3">Tidak ada data</td>
                </tr>

                <?php
            }
            ?>
        </table>
    </div>
    <?php echo $paging; ?>
    <br class="bersih" />
</div>
<script type="text/javascript">

    jQuery(document).ready(function(){
        jQuery(".tr_slide").hide();

        jQuery('.search').click(
        function(){
            jQuery(".tr_slide").slideToggle();
        }
    );

    });

</script>